<?php
namespace Home\Controller;
use Think\Controller;
class GoodsController extends Controller {
	//展示所有商品
    public function goods_list(){
    	$goods_info = M('goods')->select();
    	
    	$this->assign('goods_info',$goods_info);
        
        $this->display();
    }

   
    //展示单个商品
    public function detail(){
    	$id = I('id');
    	$arr = array('id'=>$id);

        $goods_info = M('goods')->where($arr)->select();
    	
    	$this->assign('goods_info',$goods_info);
        
        $this->display();
    }
}